<template>
  <!-- 
  <el-dialog v-model="dialogVisible" title="注销用户" width="400px">
    <template #footer>
      <el-button @click="dialogVisible = false">取消</el-button>
      <el-button type="primary" @click="userLogout">提交</el-button>
    </template>
  </el-dialog>
  -->
</template>

<script setup>
import { defineEmits, ref } from 'vue';

const dialogVisible = ref(true);
const emit = defineEmits(['userLogout']);

const userLogout = async () => {
  window.location.href ='/apigateway/logout';
};

userLogout();

const openDialog = () => {
  dialogVisible.value = true;
};

defineExpose({ openDialog });// 显式暴露子组件，使父组件可以通过 ref 访问并调用 openDialog 方法
</script>

<style>
.error {
  color: red;
}
</style>